<!--{Atemplate tpl/header}-->
<script>
function checkall(value) {
	if(value=='0'){
		jQuery(".checkbox").attr("checked","checked");
		jQuery("#chkall_del").removeAttr("disabled","disabled");
	}
	if(value=='1'){
		jQuery(".checkbox").removeAttr("checked","checked");
		jQuery("#chkall_del").attr("disabled","disabled");
	}
	if(value=='auth'){
		var chkall = jQuery("input:checked").val();
		if(chkall == null){
			alert('请先选择');
			return false;
		}else{
			return true;
		}
	}
}

jQuery(function(){
	jQuery(".checkbox").change(function (){
		if(jQuery("input:checked").val()){
			jQuery("#chkall_del").removeAttr("disabled","disabled");
		}else{
			jQuery("#chkall_del").attr("disabled","disabled");
		}
	});
})
</script>
<form method="post">
	二级域名:<input type="text" name="add[domain]">
	根域名:<input type="text" name="add[domainroot]">
	排序:<input type="text" name="add[id]" size="2">
	应用模块:<input type="text" name="add[idtype]" size="10">
	<input type="submit" name="submit" value="添加" onClick="javascript:form.action='$this->Amodr-add';" >
</form>

<form method="post" action="">
<div class="search_admin">
	<font color=red><b>(查询标题或标签):</b></font>
	<input type="text" name="key" value="">
	<input type="submit" name="submit" value="搜索" onClick="javascript:form.action='';" />
	当前查询:<font color=red><b>$key</b></font>
<!--搜索 end-->
	<a href="/admin.php?action=tools&operation=updatecache" target="_blank">更新缓存</a>（使修改生效）

</div>
<table class="-table">
	<tr>
		<th><b><a href="$page->theurl-aorder-domain,$pages->neworder$pages->other">二级域名</a></b></th>
		<th><b><a href="$page->theurl-aorder-domainroot,$pages->neworder$pages->other">根域名</a></b></th>
		<th><b><a href="$page->theurl-aorder-id,$pages->neworder$pages->other">排序</a></b></th>
		<th><b><a href="$page->theurl-aorder-idtype,$pages->neworder$pages->other">应用模块</a></b></th>
		<th><b>管理</b></th>
	</tr>
<!--{loop $lists $key $val}-->
	<tr>
		<td><input type="text" name="save[{$key}][domian]" value="$val[domain]" size="30"></td>
		<td><input type="text" name="save[{$key}][domianroot]" value="$val[domainroot]" size="20"></td>
		<td><input type="text" name="save[{$key}][id]" value="$val[id]" size="2"></td>
		<td><input type="text" name="save[{$key}][idtype]" value="$val[idtype]" size="10"></td>
		<td>
			<input type="hidden" name="save[{$key}][o_id]" value="$val[id]" size="2">
			<input type="hidden" name="save[{$key}][o_idtype]" value="$val[idtype]" size="10">
			<input type="submit" value="删除" onClick="javascript:if(confirm('确实要删除吗?')) form.action='$this->Amodr-del-$val[id],$val[idtype]';" />
		</td>
	</tr>
<!--{/loop}-->
	<tr>
		<td colspan="10">
			<input type="button" onclick="javascript:checkall(0);" value="全选" >
			<input type="button" onclick="javascript:checkall(1);" value="反选">
			<input type="submit" id="chkall_del" disabled="disabled" value="删除选择" onClick="javascript:form.action='$this->Amodr-delall';" />
			<input type="submit" name="submit" value="全部保存" onClick="javascript:form.action='$this->Amodr-save';" />
		</td>
	</tr>
</table>

</form>
<!-- 分页 -->
$pages->html

<!--{Atemplate tpl/footer}-->